#ifndef __WEBSOCKET__
#define __WEBSOCKET__

void *WebSocket_msg_listen(void *arg);
void *server_accept_init(void *arg);
void* client_service(void *arg);
int server_msg_update(char *dev_str_mac, int dev_type);
int server_msg_str_update(char *str);
char * fetchSecKey(const char * buf);
char * computeAcceptKey(const char * buf);
void shakeHand(int connfd,const char *serverKey);
char * analyData(const char * buf,const int bufLen);
char * packData(const char * message,unsigned long * len);
void response(const int connfd,const char * message);

struct pipedata{
	struct timeval tv;//存放信息发生时间
	char str[8196];   //存放字符串
};

typedef struct fds{
	int fd;
	int connect;
	struct timeval tv;
}webfd;

#endif